/*    */ package dm.jdbc.driver;
/*    */ 
/*    */ import java.io.IOException;
/*    */ import java.io.Writer;
/*    */ import java.sql.SQLException;
/*    */ 
/*    */ public class DmdbClobWriter extends Writer
/*    */ {
/*    */   private DmdbClob clob;
/* 10 */   long position = 0L;
/*    */   
/*    */   public DmdbClobWriter(DmdbClob o, long pos) {
/* 13 */     this.clob = o;
/* 14 */     this.position = pos;
/*    */   }
/*    */   
/*    */   public void write(char[] cbuf, int off, int len) throws IOException {
/* 18 */     write(new String(cbuf), off, len);
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   public void write(String str, int off, int len)
/*    */     throws IOException
/*    */   {
/* 35 */     long realLength = 0L;
/*    */     try
/*    */     {
/* 38 */       realLength = this.clob.setString(this.position, str, off, len);
/* 39 */       this.position += realLength;
/*    */     } catch (SQLException e) {
/* 41 */       throw new IOException(e.getMessage());
/*    */     }
/*    */   }
/*    */   
/*    */   public void flush()
/*    */     throws IOException
/*    */   {}
/*    */   
/*    */   public void close()
/*    */     throws IOException
/*    */   {}
/*    */ }


/* Location:              D:\Program Files\DBMS_20150813\jdbc\Dm7JdbcDriver17.jar!\dm\jdbc\driver\DmdbClobWriter.class
 * Java compiler version: 2 (46.0)
 * JD-Core Version:       0.7.1
 */